package mmoon.mmoonstory.interfaces;

import mmoon.mmoonstory.MMoonAll;
import mmoon.mmoonstory.MMoonStory;
import mmoon.mmoonstory.MMoonUtils;
import net.minecraft.item.Item;

public interface InitItem {
    String ObjID = "Null";

    default void init(String objID) {
        Item item = this.setID(objID);
        item.setCreativeTab(MMoonUtils.MMOON_CREATIVE_TAB);
        MMoonAll.MMOON_ITEMS.add(item);
    }

    default Item setID(String objID) {
        Item item = (Item) this;
        item.setRegistryName(MMoonStory.MOD_ID, objID);
        item.setTranslationKey(MMoonStory.MOD_ID + '.' + objID);
        return item;
    }
}
